package com.ruoyi.busy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.busy.mapper.BusyGroupMapper;
import com.ruoyi.busy.domain.BusyGroup;
import com.ruoyi.busy.service.IBusyGroupService;

/**
 * 设备标签组Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-22
 */
@Service
public class BusyGroupServiceImpl implements IBusyGroupService 
{
    @Autowired
    private BusyGroupMapper busyGroupMapper;

    /**
     * 查询设备标签组
     * 
     * @param id 设备标签组主键
     * @return 设备标签组
     */
    @Override
    public BusyGroup selectBusyGroupById(Long id)
    {
        return busyGroupMapper.selectBusyGroupById(id);
    }

    /**
     * 查询设备标签组列表
     * 
     * @param busyGroup 设备标签组
     * @return 设备标签组
     */
    @Override
    public List<BusyGroup> selectBusyGroupList(BusyGroup busyGroup)
    {
        return busyGroupMapper.selectBusyGroupList(busyGroup);
    }

    /**
     * 新增设备标签组
     * 
     * @param busyGroup 设备标签组
     * @return 结果
     */
    @Override
    public int insertBusyGroup(BusyGroup busyGroup)
    {
        busyGroup.setCreateTime(DateUtils.getNowDate());
        return busyGroupMapper.insertBusyGroup(busyGroup);
    }

    /**
     * 修改设备标签组
     * 
     * @param busyGroup 设备标签组
     * @return 结果
     */
    @Override
    public int updateBusyGroup(BusyGroup busyGroup)
    {
        busyGroup.setUpdateTime(DateUtils.getNowDate());
        return busyGroupMapper.updateBusyGroup(busyGroup);
    }

    /**
     * 批量删除设备标签组
     * 
     * @param ids 需要删除的设备标签组主键
     * @return 结果
     */
    @Override
    public int deleteBusyGroupByIds(Long[] ids)
    {
        return busyGroupMapper.deleteBusyGroupByIds(ids);
    }

    /**
     * 删除设备标签组信息
     * 
     * @param id 设备标签组主键
     * @return 结果
     */
    @Override
    public int deleteBusyGroupById(Long id)
    {
        return busyGroupMapper.deleteBusyGroupById(id);
    }
}
